From: Jackmcbarn Date: Sat, 28 Sep 2013 15:05:38 +0000 (-0400) Subject: Allow descending-order sort of Special:ListUsers X-Git-Tag: 1.31.0-rc.0~18656 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=217fd4345ada3f9899406bf352219bb795876706;p=lhc%2Fweb%2Fwiklou.git Allow descending-order sort of Special:ListUsers Add an option to Special:ListUsers allowing it to be sorted in descending order. Change-Id: Icfff90a18a62f8f0b70e42313fc3285cf7e44c82 --- diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 75b8490594..8cd9173cd6 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -69,6 +69,7 @@ class UsersPager extends AlphabeticPager { $this->editsOnly = $request->getBool( 'editsOnly' ); $this->creationSort = $request->getBool( 'creationSort' ); $this->including = $including; + $this->mDefaultDirection = $request->getBool( 'desc' ); $this->requestedUser = ''; @@ -277,6 +278,13 @@ class UsersPager extends AlphabeticPager { 'creationSort', $this->creationSort ); + $out .= ' '; + $out .= Xml::checkLabel( + $this->msg( 'listusers-desc' )->text(), + 'desc', + 'desc', + $this->mDefaultDirection + ); $out .= '
'; wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 897f6393b3..529c2c89df 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2771,6 +2771,7 @@ It now redirects to [[$2]].', 'listusers-summary' => '', # do not translate or duplicate this message to other languages 'listusers-editsonly' => 'Show only users with edits', 'listusers-creationsort' => 'Sort by creation date', +'listusers-desc' => 'Sort in descending order', 'usereditcount' => '$1 {{PLURAL:$1|edit|edits}}', 'usercreated' => '{{GENDER:$3|Created}} on $1 at $2', 'newpages' => 'New pages', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 96de35958c..f50039d0a3 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -4924,6 +4924,7 @@ See the following search results: 'listusers' => '{{doc-special|ListUsers}}', 'listusers-editsonly' => 'Option in [[Special:ListUsers]].', 'listusers-creationsort' => 'Option in [[Special:ListUsers]].', +'listusers-desc' => 'Option in [[Special:ListUsers]].', 'usereditcount' => 'Shown behind every username on [[Special:ListUsers]]. Parameters: * $1 - number of edits', 'usercreated' => 'Used in [[Special:ListUsers]]. Parameters: diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 43be19538c..991fc1b16c 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1841,6 +1841,7 @@ $wgMessageStructure = array( 'listusers-summary', 'listusers-editsonly', 'listusers-creationsort', + 'listusers-desc', 'usereditcount', 'usercreated', 'newpages',